package chenji.yourticket.editor;

import java.util.HashSet;

import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;

import chenji.yourticket.Main;
import chenji.yourticket.inventory.SimpleItemStack;

public class MaterialInfo {
	private double price;
	private HashSet<Enchantment> enchlist;
	private Material m;
	private ItemStack DisplayItemStack;

	public MaterialInfo(HashSet<Enchantment> enchlist, Material material, double price) {
		this.price = price;
		this.enchlist = enchlist;
		this.m = material;
	}

	public double getPrice() {
		return this.price;
	}

	public Material getMaterial() {
		return this.m;
	}

	public HashSet<Enchantment> getEnchantmentList() {
		return this.enchlist;
	}

	public ItemStack getDisplayItemStack() {
		if (this.DisplayItemStack == null) {
			DisplayItemStack = new SimpleItemStack(m, Main.getMessageManager().getItem_DisplyMaterial_Lore().replaceAll(
					"%price%", Double.toString(this.price)), Main.getMessageManager().getItem_DisplyMaterial_Title());
		}
		return this.DisplayItemStack;
	}

}
